<!-- 个人账户信息 -->
<template>
  <div class="account">
      <!-- 下拉刷新 -->
      <backHeader :title="title" v-if='itemList'></backHeader>
      <van-pull-refresh v-model="isLoading" @refresh="onRefresh" loosing-text="松开立即刷新">
          <itemList :itemList="itemList"></itemList>
      </van-pull-refresh>
      <noData v-if="!itemList || itemList.length===0"></noData>
  </div>
</template>

<script>
import backHeader from './backHeader'
import itemList from './itemList'
import noData from './noData'
export default {
  nmae: 'account',
  props: ['title', 'itemList'],
  data () {
    return {
      isLoading: false
    }
  },
  components: {
    backHeader, itemList, noData
  },

  computed: {},
  mounted () {
  },
  methods: {
    onRefresh () {
      setTimeout(() => {
        this.$toast('刷新成功')
        this.isLoading = false
      }, 500)
    }
  }
}

</script>
<style lang='less' scoped>
</style>
